<?php
// +----------------------------------------------------------------------
// | 99PHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2018~2020 https://www.99php.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Mr.Chung <chung@99php.cn >
// +----------------------------------------------------------------------

namespace app\blog\controller;


use app\common\controller\BlogController;
use app\common\service\MailService;
use app\common\service\SmsService;
use think\Db;
use think\File;

class Test extends BlogController {

    public function log() {
        $article = Db::name('BlogArticle')->select();
        P($article);
    }

    public function index() {
        $url = url('@blog/article/detail', ['id' => 1]);
        dump($url);
//        return $this->fetch();
    }

    public function send() {
        dump(MailService::send('chung@99php.cn', '测试邮箱', '你好啊啊啊111111'));
//        dump(SmsService::sendSms('15521045862'));
    }

    public function rank() {
        dump(model('SearchRecord')->getRank());
    }

    public function model() {
        $list = [
            'test1',
            'test2',
            'test3',
        ];
        foreach ($list as $vo) {
            $test[] = model('Tag')->insertGetId(['tag_title' => $vo]);
        }
        dump($test);
    }

    public function ceshi() {
        $test = '[{"phrase":"[挤眼]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c3/zy_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c3/zy_thumb.gif","value":"[挤眼]","picid":""},{"phrase":"[亲亲]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/8f/qq_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/8f/qq_thumb.gif","value":"[亲亲]","picid":""},{"phrase":"[太开心]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/58/mb_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/58/mb_thumb.gif","value":"[太开心]","picid":""},{"phrase":"[生病]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b6/sb_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b6/sb_thumb.gif","value":"[生病]","picid":""},{"phrase":"[书呆子]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/61/sdz_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/61/sdz_thumb.gif","value":"[书呆子]","picid":""},{"phrase":"[失望]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0c/sw_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0c/sw_thumb.gif","value":"[失望]","picid":""},{"phrase":"[可怜]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/af/kl_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/af/kl_thumb.gif","value":"[可怜]","picid":""},{"phrase":"[黑线]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/91/h_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/91/h_thumb.gif","value":"[黑线]","picid":""},{"phrase":"[吐]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9e/t_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9e/t_thumb.gif","value":"[吐]","picid":""},{"phrase":"[委屈]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/73/wq_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/73/wq_thumb.gif","value":"[委屈]","picid":""},{"phrase":"[思考]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e9/sk_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e9/sk_thumb.gif","value":"[思考]","picid":""},{"phrase":"[哈哈]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6a/laugh.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6a/laugh.gif","value":"[哈哈]","picid":""},{"phrase":"[嘘]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a6/x_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a6/x_thumb.gif","value":"[嘘]","picid":""},{"phrase":"[右哼哼]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/98/yhh_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/98/yhh_thumb.gif","value":"[右哼哼]","picid":""},{"phrase":"[左哼哼]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6d/zhh_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6d/zhh_thumb.gif","value":"[左哼哼]","picid":""},{"phrase":"[疑问]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/5c/yw_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/5c/yw_thumb.gif","value":"[疑问]","picid":""},{"phrase":"[阴险]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6d/yx_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6d/yx_thumb.gif","value":"[阴险]","picid":""},{"phrase":"[顶]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/91/d_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/91/d_thumb.gif","value":"[顶]","picid":""},{"phrase":"[钱]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/90/money_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/90/money_thumb.gif","value":"[钱]","picid":""},{"phrase":"[悲伤]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1a/bs_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1a/bs_thumb.gif","value":"[悲伤]","picid":""},{"phrase":"[鄙视]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/71/bs2_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/71/bs2_thumb.gif","value":"[鄙视]","picid":""},{"phrase":"[拜拜]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/70/88_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/70/88_thumb.gif","value":"[拜拜]","picid":""},{"phrase":"[吃惊]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f4/cj_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f4/cj_thumb.gif","value":"[吃惊]","picid":""},{"phrase":"[闭嘴]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/29/bz_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/29/bz_thumb.gif","value":"[闭嘴]","picid":""},{"phrase":"[衰]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/af/cry.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/af/cry.gif","value":"[衰]","picid":""},{"phrase":"[愤怒]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/bd/fn_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/bd/fn_thumb.gif","value":"[愤怒]","picid":""},{"phrase":"[感冒]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a0/gm_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a0/gm_thumb.gif","value":"[感冒]","picid":""},{"phrase":"[酷]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/cool_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/cool_thumb.gif","value":"[酷]","picid":""},{"phrase":"[来]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/come_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/come_thumb.gif","value":"[来]","picid":""},{"phrase":"[good]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d8/good_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d8/good_thumb.gif","value":"[good]","picid":""},{"phrase":"[haha]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/13/ha_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/13/ha_thumb.gif","value":"[haha]","picid":""},{"phrase":"[ok]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d6/ok_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d6/ok_thumb.gif","value":"[ok]","picid":""},{"phrase":"[拳头]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/cc/o_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/cc/o_thumb.gif","value":"[拳头]","picid":""},{"phrase":"[弱]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d8/sad_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d8/sad_thumb.gif","value":"[弱]","picid":""},{"phrase":"[握手]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0c/ws_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0c/ws_thumb.gif","value":"[握手]","picid":""},{"phrase":"[赞]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d0/z2_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d0/z2_thumb.gif","value":"[赞]","picid":""},{"phrase":"[耶]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d9/ye_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d9/ye_thumb.gif","value":"[耶]","picid":""},{"phrase":"[最差]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3e/bad_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3e/bad_thumb.gif","value":"[最差]","picid":""},{"phrase":"[NO]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ae/buyao_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ae/buyao_org.gif","value":"[NO]","picid":""},{"phrase":"[怒骂]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/60/numav2_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/60/numav2_thumb.gif","value":"[怒骂]","picid":""},{"phrase":"[困]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/kunv2_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/kunv2_thumb.gif","value":"[困]","picid":""},{"phrase":"[哈欠]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/cc/haqianv2_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/cc/haqianv2_thumb.gif","value":"[哈欠]","picid":""},{"phrase":"[微笑]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/5c/huanglianwx_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/5c/huanglianwx_thumb.gif","value":"[微笑]","picid":""},{"phrase":"[白眼]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d9/landeln_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d9/landeln_thumb.gif","value":"[白眼]","picid":""},{"phrase":"[睡]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/96/huangliansj_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/96/huangliansj_thumb.gif","value":"[睡]","picid":""},{"phrase":"[色]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/20/huanglianse_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/20/huanglianse_thumb.gif","value":"[色]","picid":""},{"phrase":"[挖鼻]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0b/wabi_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0b/wabi_thumb.gif","value":"[挖鼻]","picid":""},{"phrase":"[傻眼]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/2b/shayan_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/2b/shayan_thumb.gif","value":"[傻眼]","picid":""},{"phrase":"[打脸]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/32/dalian_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/32/dalian_thumb.gif","value":"[打脸]","picid":""},{"phrase":"[作揖]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/06/zuoyi_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/06/zuoyi_thumb.gif","value":"[作揖]","picid":""},{"phrase":"[笑cry]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/34/xiaoku_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/34/xiaoku_thumb.gif","value":"[笑cry]","picid":""},{"phrase":"[红丝带]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/59/red_band_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/59/red_band_thumb.gif","value":"[红丝带]","picid":""},{"phrase":"[绿丝带]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9b/green_band_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9b/green_band_thumb.gif","value":"[绿丝带]","picid":""},{"phrase":"[可爱]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/14/tza_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/14/tza_thumb.gif","value":"[可爱]","picid":""},{"phrase":"[嘻嘻]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0b/tootha_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0b/tootha_thumb.gif","value":"[嘻嘻]","picid":""},{"phrase":"[汗]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/24/sweata_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/24/sweata_thumb.gif","value":"[汗]","picid":""},{"phrase":"[害羞]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6e/shamea_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6e/shamea_thumb.gif","value":"[害羞]","picid":""},{"phrase":"[泪]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9d/sada_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9d/sada_thumb.gif","value":"[泪]","picid":""},{"phrase":"[爱你]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6d/lovea_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6d/lovea_thumb.gif","value":"[爱你]","picid":""},{"phrase":"[偷笑]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/19/heia_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/19/heia_thumb.gif","value":"[偷笑]","picid":""},{"phrase":"[心]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/hearta_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/hearta_thumb.gif","value":"[心]","picid":""},{"phrase":"[哼]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/49/hatea_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/49/hatea_thumb.gif","value":"[哼]","picid":""},{"phrase":"[鼓掌]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/36/gza_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/36/gza_thumb.gif","value":"[鼓掌]","picid":""},{"phrase":"[晕]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d9/dizzya_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d9/dizzya_thumb.gif","value":"[晕]","picid":""},{"phrase":"[馋嘴]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a5/cza_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a5/cza_thumb.gif","value":"[馋嘴]","picid":""},{"phrase":"[抓狂]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/62/crazya_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/62/crazya_thumb.gif","value":"[抓狂]","picid":""},{"phrase":"[抱抱_旧]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/27/bba_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/27/bba_thumb.gif","value":"[抱抱_旧]","picid":""},{"phrase":"[怒]","type":"face","url":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/7c/angrya_org.gif","hot":false,"common":false,"category":"心情","icon":"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/7c/angrya_thumb.gif","value":"[怒]","picid":""}]';
        $test = json_decode($test, true);
        $i = 0;
        foreach ($test as $vo) {
            $ceshi[$i]['alt'] = $vo['phrase'];
            $ceshi[$i]['src'] = $vo['url'];
            $i++;
        }
        return json($ceshi);
    }

    public function upload() {
        // 获取表单上传文件 例如上传了001.jpg
        $file = request()->file('image');
        // 移动到框架应用根目录/uploads/ 目录下
        $info = $file->move('../uploads');
        if ($info) {
            // 成功上传后 获取上传信息
            // 输出 jpg
            echo $info->getExtension();
            // 输出 20160820/42a79759f284b767dfcb2a0197904287.jpg
            echo $info->getSaveName();
            // 输出 42a79759f284b767dfcb2a0197904287.jpg
            echo $info->getFilename();
        } else {
            // 上传失败获取错误信息
            echo $file->getError();
        }
    }
}